package com.ssh.entity;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Product extends BaseEntity{
	private static final long serialVersionUID = 6002548593623858681L;
	private String name;
	private Timestamp createDate;
	private Integer del;
	private String barcode;
	private String xiangGui;
	private String pinLei;
	private Brand brand;

	public Product() {
	}
	
	@ManyToOne(cascade ={CascadeType.ALL},fetch = FetchType.LAZY)       
    @JoinColumn(name="brandId") 
	public Brand getBrand() {
		return brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Timestamp getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Integer getDel() {
		return this.del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

	public String getBarcode() {
		return this.barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	public String getXiangGui() {
		return xiangGui;
	}

	public void setXiangGui(String xiangGui) {
		this.xiangGui = xiangGui;
	}

	public String getPinLei() {
		return pinLei;
	}

	public void setPinLei(String pinLei) {
		this.pinLei = pinLei;
	}

}